package com.thwj.project.biz.enums;

/***
 * 消息类型
 */
public enum MessageBelongTypeEnum {

    SYSTEM_MESSAGE(10,"系统消息","https://static.zhaodazi.club/static/message-system.png"),
    DYNAMICS_MESSAGE(20,"动态消息","https://static.zhaodazi.club/static/message-hudong.png"),
    DIDI_MESSAGE(30,"滴滴消息","https://static.zhaodazi.club/static/message-dd.png"),
    ;
    MessageBelongTypeEnum(int value, String name, String icon) {
        this.name = name;
        this.value = value;
        this.icon = icon;
    }

    private int value;
    private String name;
    private String icon;

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public String getIcon() {
        return icon;
    }

    public static MessageBelongTypeEnum getEnumByValue(Integer value){
        for (MessageBelongTypeEnum typeEnum : MessageBelongTypeEnum.values()) {
            if(typeEnum.value == value) {
                return typeEnum;
            }
        }
        return null;
    }
}
